package com.ferrlo.test;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.junit.Test;

import com.ferrlo.model.User;
import com.ferrlo.service.IUserManager;

public class testLogin extends SpringUtils{

	
	@Test
	public void login(){
		IUserManager userManager = (IUserManager) applicationContext.getBean("userManager");
		
		String nickName = "calt";
	
		String dqQuery = "UserManager.findUserByUNickName.query";
		Map<String, Object> param = new HashMap<String, Object>();
		param.put("nickName", nickName);
		List<User> users = userManager.findListByDynamicQuery(dqQuery, param);
		if (users.size() == 0) {
			System.out.println("0");
		} else {
			System.out.println("not 0");
		}
		
	}
	
}
